package com.foreknow.demo10;

/**
 * 动态可变参数
 * Object...values 相当于一个Object[]
 */
public class DyDemo {
    public void m1(String sql,Object...values) {
        for(int i = 0;i<values.length;i++){
            System.out.println(values[i]);
        }
    }

    public static void main(String[] args) {
        DyDemo demo = new DyDemo();
        demo.m1("select * from admin");
        demo.m1("select * from admin where name = ? and pass = ?","fender","123456");
    }
}
